﻿using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Web.Mvc;
using Xenta.Utils;
using Xenta.Web.Controllers;

namespace Xenta.Web.Areas.Catalog.Controllers
{
    public sealed class CatalogController : ExtController
    {
        #region GET/POST Actions

        [HttpGet]
        public  ActionResult Index()
        {
            return View();
        }

        #endregion

        #region Child Actions

        [ChildActionOnly]
        public ActionResult _Categories()
        {
            var m = Svc.ProcessOperation("SearchCatalogCategories", new
            {
                ParentID = 0,
                FlagMask = "Active"
            }, new
            {
                DisclosureLevel = "Base",
                DisclosureOptions = new Dictionary<String, String>
                {
                    { "TranslatedTo", JDM.String(Svc.Localization.Language.Code) }
                }.Unload()
            });
            return PartialView(m);
        }

        #endregion
    }
}
